package body

import "time"

type HealthManage struct {
	ID                 uint                `json:"ttlx_id" gorm:"primarykey;column:id"`
	Name               string              `json:"name" gorm:"column:name"`
	Types              uint                `json:"types" gorm:"column:types"`
	Image              string              `json:"img" gorm:"column:image"`
	HealthManageChilds []HealthManageChild `json:"ttdcount" gorm:"foreignKey:Pid;references:ID;comment:二级;"`
}

type HealthManageChild struct {
	ID      uint   `json:"value" gorm:"primarykey;column:id"`
	Pid     uint   `json:"tt_id" gorm:"column:pid"`
	Name    string `json:"text" gorm:"column:name"`
	Class   uint   `json:"class" gorm:"column:class"`
	Types   uint   `json:"types" gorm:"column:types"`
	Checked bool   `json:"checked" gorm:"-"`
}

type HealthManageProgram struct {
	ID        uint      `json:"id" gorm:"primarykey;column:id"`
	CreatedAt time.Time `json:"created_at" gorm:"column:created_at"`
	HmcID     uint      `json:"hmc_id" gorm:"column:hmc_id"`
	Types     uint      `json:"types" gorm:"column:types"`
	Title     string    `json:"title" gorm:"column:title"`
	Cover     string    `json:"cover" gorm:"column:cover"`
	Image     string    `json:"image" gorm:"column:image"`
	Synopsis  string    `json:"synopsis" gorm:"column:synopsis"`
	Content   string    `json:"content" gorm:"column:content"`
	Video     string    `json:"video" gorm:"column:video"`
	Status    *bool     `json:"status" gorm:"column:status"`
	Sort      uint      `json:"sort" gorm:"column:sort"`
}

type HealthManageTag struct {
	ID           uint      `json:"id" gorm:"primarykey;column:id"`
	CreatedAt    time.Time `json:"created_at" gorm:"column:created_at"`
	UpdatedAt    time.Time `json:"updated_at" gorm:"column:updated_at"`
	Uid          uint      `json:"uid" gorm:"column:uid"`
	PlaceTypes   string    `json:"place_types" gorm:"column:place_types"`
	Place        string    `json:"place" gorm:"column:place"`
	Types        uint      `json:"types" gorm:"column:types"`
	Status       *bool     `json:"status" gorm:"column:status;default:0;"`
	Level        uint      `json:"level" gorm:"column:level"`
	Other        string    `json:"other" gorm:"column:other;type:text;"`
	FasciaChain  string    `json:"fascia_chain" gorm:"column:fascia_chain;content:筋膜链;"`
	CorrectCycle uint      `json:"correct_cycle" gorm:"column:correct_cycle;content:矫正周期;"`
}

// TableName HealthManage 健康管理表
func (HealthManage) TableName() string {
	return "fd_health_manage"
}

// TableName HealthManageChild 健康管理子分类表
func (HealthManageChild) TableName() string {
	return "fd_health_manage_child"
}

// TableName HealthManageProgram 健康管理方案表
func (HealthManageProgram) TableName() string {
	return "fd_health_manage_program"
}

// TableName HealthManageTag 用户健康管理选择表
func (HealthManageTag) TableName() string {
	return "fd_health_manage_tag"
}
